﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="RolesManager.aspx.cs" Inherits="$rootnamespace$.admin.access.RolesManager" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">


    <section class="panel">
	    <header class="panel-heading">
					<h2>Roles</h2>
			</header>
			<div class="panel-tools" align="right">
				<ul class="tooltip-area">
					<li><a href="javascript:void(0)" class="btn btn-collapse" title="Collapse"><i class="fa fa-sort-amount-asc"></i></a></li>
					<li><a href="javascript:void(0)" class="btn btn-reload"  title="Reload"><i class="fa fa-retweet"></i></a></li>
					<li><a href="javascript:void(0)" class="btn btn-close" title="Close"><i class="fa fa-times"></i></a></li>
				</ul>
			</div>
			<div class="panel-body">

                <!-- PUT YOUR CONTENT HERE -->

<form id="form1" runat="server">   

    <table class="webparts">
        <tr>
        <td class="details" style="width: 450px;vertical-align:top">

            <br />

            <asp:GridView runat="server" ID="UserRoles" AutoGenerateColumns="false" CssClass="tabel table-bordered" GridLines="none">
	            <Columns>
		            <asp:TemplateField>
			            <HeaderTemplate>Role Name</HeaderTemplate>
			            <ItemTemplate>
				            <%# Eval("Role Name") %>
			            </ItemTemplate>
		            </asp:TemplateField>
		            <asp:TemplateField>
			            <HeaderTemplate>User Count</HeaderTemplate>
			            <ItemTemplate>
				            <%# Eval("User Count") %>
			            </ItemTemplate>
		            </asp:TemplateField>
		            <asp:TemplateField>
			            <HeaderTemplate>Delete Role</HeaderTemplate>
			            <ItemTemplate>
				            <asp:Button ID="Button1" runat="server" OnCommand="DeleteRole" CommandName="DeleteRole" CommandArgument='<%# Eval("Role Name") %>' Text="Delete" OnClientClick="return confirm('Are you sure?')" />
			            </ItemTemplate>
		            </asp:TemplateField>
	            </Columns>
            </asp:GridView>

            <p>
            New Role:
            <asp:TextBox runat="server" ID="NewRole"></asp:TextBox>

            <asp:Button ID="Button2" runat="server" OnClick="AddRole" Text="Add Role" />
            </p>

            <div runat="server" id="ConfirmationMessage" class="alert">
            </div>
        </td>
        </tr>
    </table>

</form>


			</div>
			<footer class="panel-footer">
				<button type="submit" class="btn" data-color="#F4AD41">Submit</button>
				<button type="reset" class="btn">Cancel</button>
			</footer>
	</section>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="LocaJavascript" runat="server">
    <script type="text/javascript">
        $(document).ready(function () {
            //var title = jQuery(this).attr('title');
            $("li:contains('Gestione Ruoli')").addClass("active");
        });
    </script>
</asp:Content>
